package com.briup.estore.common.service;

import com.briup.estore.common.bean.Category;
import com.briup.estore.common.bean.VO.CategoryVO;

import java.util.List;
import java.util.Map;

/**
 * @author adam
 * @date 2022/10/13
 */
public interface ICategoryService {
    List<CategoryVO> findAll() throws Exception;

    List<Category> findOneLevel() throws Exception;

    List<Category> findTwoLevel(long oneLevelCategoryId) throws Exception;

    void addCategory(Category category) throws Exception;

    void delete(long id);

    List<Category> findOneLevelByName(String name);

    List<Category> findTwoLevelByName(String name, long id);

    long countTwoLevelCategory();

    Map<String, Long> categoryStats();
}
